﻿<DemoContainer>
    <ApexChart TItem="Order"
               Title="Order Net Value"
               Options="options">

        <ApexPointSeries TItem="Order"
                         Items="orders"
                         Name="Gross Value"
                         SeriesType="SeriesType.Line"
                         XValue="@(e => e.Country)"
                         YAggregate="@(e => e.Sum(e => e.GrossValue))"
                         OrderByDescending="e=>e.Y" />


    </ApexChart>
</DemoContainer>

@code {
    private List<Order> orders { get; set; } = SampleData.GetOrders();
    private ApexChartOptions<Order> options { get; set; } = new();

    protected override void OnInitialized()
    {
        options.Markers = new Markers
            {
                Discrete = new List<MarkersDiscrete>() {
                    new MarkersDiscrete {
                        SeriesIndex = 0,
                        DataPointIndex = 2,
                        Size = 10,
                        FillColor = "#F30707"
                    }
                }
            };
    }
}